<template>
<div class="div_page_top_middle" style="width:100%;background-color:#ffffff;padding:0px;margin:0px">

<div class="div_page_top_middle" style="width:100%;">
    <!--div style="text-align:center;width:100%;">
      <img src="~@/assets/logo_v2.png" style="width:100%;">
    </div-->
<div class="div_page_top_middle" style="width:100%;text-align:center;padding:0px;margin:0px">

<!--div class="headerSearch" style="text-align:center;width:80%;">
    <div style="text-align:center;width:100%;text-size:24px;">
    <input id="search_id" placeholder="输入股票代码或名称并选择，如:[600][银行]" type="search" v-model.trim="keyword" v-on:focus="focus()" autocomplete=“off”>
    <div class="search_menu">
      <ul class="input_suggest">
    <li v-for="input_val in input_list" :key="input_val" @click.left="select_li(input_val)">
      {{input_val}}
    </li>
    </ul>
    </div>
    </div>
</div-->

<div class="div_main_frame" style="width:100%;margin:0;padding:0;height:120px;font-size:18px;line-height:20px;text-align:left">
<div class="div_main_frame" style="margin-left:6px;width:98%;text-align:left;font-size:14px;">
<el-form ref="form" :model="entity_form" label-width="auto" :size="size">
<!--el-form ref="formRef" :model="form" label-width="60px"-->
    <el-form-item label="实体集">
      <el-input v-model="entity_form.entity_name"></el-input>
    </el-form-item>
    <!--el-input v-model="entity_name"></el-input-->
    <el-button type="primary" @click="searchEntity">搜索</el-button>
    <router-link to="suggest"><span style="line-height:40px;padding-left:10px;">自定义实体集</span></router-link>
</el-form>
</div>
</div>
<!--div>
  <input type="search" v-model.trim="entity_name" style="line-height:32px;font-size:26px;">
</div>
<div>
  <button @click="searchEntity" style="line-height:32px;font-size:26px;">搜索</button>
</div-->

</div>
</div>
</div>
</template>

<script>
import { reactive,ref } from 'vue'
import { getCurrentInstance } from 'vue'
export default ({
    name: 'ViewHeadSearch',
    data () {
      return {
        keyword: '',
        input_list:[]
      };
    },
    setup(){
      const entity_name = '';
      const entity_form = reactive({
        entity_name: '',
      });
      const host = getCurrentInstance()?.appContext.config.globalProperties.host
      return {entity_form, entity_name, host}
    },
    methods: {
      searchEntity(){
        var router_path = "/search?word=" + this.entity_form.entity_name
        this.$router.push(router_path)
        //this.getDatas(this.entity_name);
      },

    },
    watch:{

    },
})

</script>

<style>


.bottom_line {
    padding: 2px;
    background-color: #409EFF;
}
</style>

<style scoped>

</style>